//
//  HWAboutBookViewController.m
//  嗨文
//
//  Created by 响当当 on 2019/1/19.
//  Copyright © 2019年 dongzheng. All rights reserved.
//

#import "HWAboutBookViewController.h"

@interface HWAboutBookViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UILabel *appName;
@property (weak, nonatomic) IBOutlet UILabel *verson;
@property (weak, nonatomic) IBOutlet UILabel *introduce;

@end

@implementation HWAboutBookViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self buryPoint];
    [self setTitle:@"关于嗨小说"];
    [self setDefaultNav];
    
    
    self.iconImgView.frame = CGRectMake(SCREEN_WIDTH/2-43.5*kUIScaleBasePlus,30*kUIScaleBasePlus+NAVIBAR_HEIGHT,87*kUIScaleBasePlus,87*kUIScaleBasePlus);
    self.iconImgView.image = [UIImage imageNamed:@"about_hinovel"];
    [self.view addSubview:self.iconImgView];
    
    
    self.appName.frame = CGRectMake(0,CGRectGetMaxY(self.iconImgView.frame)+14*kUIScaleBasePlus,SCREEN_WIDTH,16*kUIScaleBasePlus);
    
    self.verson.frame = CGRectMake(0,CGRectGetMaxY(self.appName.frame)+11*kUIScaleBasePlus,SCREEN_WIDTH,10*kUIScaleBasePlus);
    self.verson.text = [NSString stringWithFormat:@"%@",appVersion];
    
    self.introduce.frame = CGRectMake(10*kUIScaleBasePlus,CGRectGetMaxY(self.verson.frame)+18*kUIScaleBasePlus,SCREEN_WIDTH-20*kUIScaleBasePlus,0);
    self.introduce.text = @"           嗨小说是苏州嗨趣网络科技有限公司旗下的小说平台，平台收录近千部热门小说，目前包括网页和微信公众号。平台为用户提供嗨读、嗨赚、嗨写等服务，用户在体会看书乐趣的同时，也能通过平台获得现金奖励。\n           本平台大部分小说版权来自阅明中文网和愚猫看书，如有内容问题与本平台无关。";
    self.introduce.numberOfLines = 0;
    [self.introduce sizeToFit];
    
}

- (void)buryPoint
{
    NSString *lastStayTime = [kUserDefaults objectForKey:@"time"];
    NSString *nowStayTime = [NSString stringWithFormat:@"%ld",[[HWUtilties getNowTimeTimestamp3] integerValue] - lastStayTime.integerValue];
    
    [HWUtilties buryPointWithStayTime:nowStayTime
                            timestamp:[HWUtilties getNowTimeTimestamp3]
                             memberId:current_User.userID
                              fromUrl:nil
                                toUrl:@"/about"
                               fromId:nil
                                 toId:@"9959c927df4fc65f"];
}

@end
